﻿using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using EvincePayroll.Data;
using EvincePayroll.Logic;
using EvincePayroll.Utility;

namespace Evince.Service
{
    // Start the service and browse to http://<machine_name>:<port>/Service1/help to view the service's generated help page
    // NOTE: By default, a new instance of the service is created for each call; change the InstanceContextMode to Single if you want
    // a single instance of the service to process all calls.	
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    // NOTE: If the service is renamed, remember to update the global.asax.cs file
    public class AttendanceService
    {


        [WebGet(UriTemplate = "ShowAttendanceDetail/{email},{attendanceId}")]
        public List<AttendanceLogData> ShowAttendanceDetail(string email, string attendanceId)
        {
            try
            {
                AttendanceLogic employee = new AttendanceLogic(email);
                return employee.ShowAttendanceDetail(email, attendanceId);
            }
            catch (Exception ex)
            {
                LogEngine.Log(ex.Message);
                throw;
            }
        }













    }
}